package com.example.myapplication.presenter;

import android.util.Log;

import com.example.myapplication.base.BasePresenter;
import com.example.myapplication.bean.SquaseBean;
import com.example.myapplication.model.SquareModel;
import com.example.myapplication.net.ResultCallBack;
import com.example.myapplication.view.SquareView;

public class SquarePresenter extends BasePresenter<SquareView> {

    private SquareModel squareModel;

    @Override
    protected void initModel() {
        squareModel = new SquareModel();
        addModel(squareModel);
    }

    public void getSquareData(int page) {
        squareModel.getSquareData(page, new ResultCallBack<SquaseBean>() {
            @Override
            public void onSuccess(SquaseBean squaseBean) {
                mView.setData(squaseBean);
            }

            @Override
            public void onFail(String msg) {

            }
        });
    }

    private static final String TAG = "SquarePresenter";
}
